/*
 * Copyright (C) 2009 Lianhaidong <lianhaidong@gmail.com>
 */

#include "utils/single_list.h"

struct slist_node *slist_del(struct slist *sl, struct slist_node *sn)
{
	struct slist_node **pp;

	for (pp = &sl->head; *pp; pp = &(*pp)->next) {
		if ((*pp) == sn) {
			(*pp) = (*pp)->next;
			return sn;
		}
	}

	return NULL;
}

